  <?php echo $this->user->messages(); ?>
<table class="list">

<thead>
<th style="width:150px"></th>
<th>รายละเอียด</th>

</thead>
<tbody>
<tr>
	<td class="tdlabel">เลขที่วัสดุ-ครุภัณฑ์:</td>
	<td><?php echo $row["code"]; ?></td>
</tr>
<tr>
	<td class="tdlabel">รูป</td>
	<td><img src="<?php echo base_url(); ?>timthumb.php?src=uploads/<?php echo $row["thumbnail"]; ?>&w=180&h=130&zc=1" /></td>
</tr>

<tr>
	<td class="tdlabel">ชื่อวัสดุ-ครุภัณฑ์:</td>
	<td><?php echo $row["name"]; ?></td>
</tr>
<tr>
	<td class="tdlabel">ชนิด:</td>
	<td><?php echo $row["type_name"]; ?></td>
</tr>
<tr>
	<td class="tdlabel">ยี้ห้อ:</td>
	<td><?php echo $row["brand"]; ?></td>
</tr>

<tr>
	<td class="tdlabel">รุ่นสินค้า:</td>
	<td><?php echo $row["model"]; ?></td>
</tr>

<tr>
	<td class="tdlabel">วันที่สั่งซื้อ:</td>
	<td><?php echo $row["buy_date"]; ?></td>
</tr>


<tr>
	<td class="tdlabel">รายละเอียดสินค้า:</td>
	<td><?php echo $row["detail"]; ?></td>
</tr>
<tr>
	<td class="tdlabel">วันที่ลงทะเบียน:</td>
	<td><?php echo $row["create_date2"]; ?></td>
</tr>
<tr>
	<td class="tdlabel">สถานะ:</td>
	<td><?php echo $row["m_status_name"]; ?> 
	<?php if($this->user->is_role(1)){ ?>
	[<a href="javascript:void(0);" onclick="open_popup('<?php echo site_url("admin/item_status_edit/".$row["barcode"]); ?>')">ปรับปรุงสถานะ</a>]</td>
	<?php } ?>
	</tr>
<tr>
	<td class="tdlabel">จัดสรร:</td>
	<td><?php 
	$sql ="select * from item_allocation_views where code ='".$row["code"]."'";
	$allocation_rows = $this->db->query($sql)->result_array();
	echo $this->p->request_list($allocation_rows);
	
	?></td>
</tr>

<tr>
	<td class="tdlabel">บันทึกงานซ่อม:</td>
	<td><?php 
	$sql ="select * from maintain_views where code ='".$row["code"]."'";
	$maintain_rows = $this->db->query($sql)->result_array();
	echo $this->p->maintain_list($maintain_rows);
	
	?></td>
</tr>
</tbody>
</table>




 <div class="cleaner"></div>
 

 </form>

<!--  
<div onclick="javascript:window.location='<?php echo site_url("admin/material_add_finish/".$row["material_id"]); ?>'" class="btimg">ออกรายงานเป็น PDF</div>
     --> 